/*
 * Copyright (c) 2014 - 2017. Company.Domain Co.Ltd. All rights reserved.
 */

package cn.com.dhc.danlu.activity.myself;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;

import cn.com.dhc.danlu.R;
import cn.com.dhc.danlu.activity.BaseActivity;

/**
 * author: 刘立琦(<a href="mailto:liuliqi@danlu.com">liuliqi@danlu.com</a>)<br/>
 * version: 1.0.0<br/>
 * since: 2017-01-13 10:32<br/>
 *
 * <p>
 * 我的画面-账号管理
 * </p>
 */
public class MyselfAccountManageActivity extends BaseActivity {

    /**
     * 跳转到下一个画面监听
     */
    private View.OnClickListener toNextActivityClick = new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            Intent intent = new Intent();
            switch (v.getId()) {
                case R.id.llytReceiveAddress:
                    //跳转到关于我的收货地址
                    intent.setClass(MyselfAccountManageActivity.this, MyReceiveAddressActivity.class);
                    startActivity(intent);
                    break;
                case R.id.llytMyInvoice:
                    //跳转到我的发票
                    intent.setClass(MyselfAccountManageActivity.this, MyInvoiceActivity.class);
                    startActivity(intent);
                    break;

                default:
                    break;
            }
        }
    };

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
//        getDelegate ().setContentView (R.layout.layout_myself_danlu_control, R.myself_danlu_control.class);
        setContentView(R.layout.activity_myself_account_manage);

        initViews();
    }

    @Override
    protected String getActivityTitle() {
        return null;
    }

    /**
     * 画面初始化
     */
    private void initViews() {
        // 我的收货地址
        LinearLayout llytReceiveAddress = (LinearLayout) findViewById(R.id.llytReceiveAddress);
        // 我的发票
        LinearLayout llytMyInvoice = (LinearLayout) findViewById(R.id.llytMyInvoice);
        llytBack.setOnClickListener(toNextActivityClick);
        llytMyInvoice.setOnClickListener(toNextActivityClick);
        llytReceiveAddress.setOnClickListener(toNextActivityClick);
    }
}